package com.fc.campusapplicationsystem.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @author 贺哲
 * @2020-02-29 14:29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(name = "re_List")
public class ReList {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "user_name")
    private String userName;

    @Column(name = "job_id")
    private String jobId;

    @Column(name = "user_tel")
    private String userTel;

    @Column(name = "service_id")
    private Integer serviceId;

    @Column(name = "location")
    private String location;

    /**
     * 紧急程度1：非常重要 2：重要 3：普通
     */
    @Column(name = "emergency")
    private Integer emergency;

    /**
     * 描述信息
     */
    @Column(name = "detail_info")
    private String detailInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "start_time")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "assign_time")
    private Date assignTime;

    private String responseTime;

    private String resolveTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "end_time")
    private Date endTime;

    /**
     * 处理状态 0待受理  1处理中 2已解决
     */
    @Column(name = "state")
    private Integer state;

    @Column(name = "photo")
    private String photo;
}
